80123: Function test xfi:is-forever-period

Documentation

Tests of function xfi:is-forever-period($period as element(xbrli:period)) as xs:boolean

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 19-02-2008 at 00:00:00

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670677

Test Case Variations


V-01 xfi:is-forever-period returns false for an instant context

Documentation

Inputs

  • schema: period-tests.xsd
  • instance: hello-worlds-instance.xml (DTS Discovery starting point) (ID=V01)
  • Function Call: xfi:is-forever-period( /xbrli:xbrl/xbrli:context[@id eq 'context-earth']/xbrli:period )

    (against file V01)

Outputs

  • Result test: ($result instance of xs:boolean) and count( $result ) eq 1 and $result eq false()

V-02 xfi:is-forever-period returns false for a concept whose context is an instant context

Documentation

Tests that either a the instant dateTime element is provided, or an equivalent atomic value of expected dateTime.

Inputs

Outputs

  • Result test: ($result instance of xs:boolean) and count( $result ) eq 1 and $result eq false()

V-03 Returns false for start-end duration context

Documentation

Inputs

Outputs

  • Result test: ($result instance of xs:boolean) and count( $result ) eq 1 and $result eq false()

V-04 Returns true for forever context

Documentation

Inputs

Outputs

  • Result test: ($result instance of xs:boolean) and count( $result ) eq 1 and $result eq true()

V-05 Wrong node to function

Documentation

XPath-defined error for node type incorrect.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

V-06 A sequence of periods as argument

Documentation

XPath-defined error for node type incorrect arity of argument.

Inputs

  • schema: period-tests.xsd
  • instance: hello-worlds-instance.xml (DTS Discovery starting point) (ID=V06)
  • Function Call: xfi:is-forever-period( /xbrli:xbrl/xbrli:context[@id ne 'planet-earth']/xbrli:period )

    (against file V06)

Outputs

  • Error code: xqt-err:XPTY0004

Revisions

Name On Details
Herm Fischer 19-02-2008 at 00:00:00 Created the test case.